2.8 DaemonUI Script (dui-script)

With a dui-script you can automatically mount/umount multiple images with a single action.

To execute a dui-script simply mount it on a device. If the dui-script contains no reference to the mounted device the device will no be changed!

Attention: Only one script can be excuted at a time (no parallel execution).
The application icon changes to when a script is running.
 

Command

Implemented/
Requir.Driver

Description

Examples

; comment

yes

Comment line (begins with semicolon)

; This is a comment

MOUNT devs image

yes

Mount an image to a specific device or to the selected device or to all devices

mount 1 game1.iso
mount # "game2 plus.ccd"
mount all allcd.bwt

UMOUNT devs
UNMOUNT devs

yes

Unmount a specific device or to the selected device or all devices

umount all
umount # 

ALERT text

yes

Display a messagebox!
(OK only)

alert "GameX 3 images mounted"
alert All unmounted

ENV onoff

yes

Enable/disable replacement of environment variables (e.g. %TEMP%) within the script (default is off)

ENV on

RUN [/WAIT] cmd

yes

Run command cmd
/WAIT or /W: optional, wait for completition of cmd

run "explorer.exe" /e,T:\
run /env "explorer.exe" /e,%devdir% 

WAIT msec ["message"]

yes

Wait msec-milliseconds and does nothing
Show message in wait dialog.

wait 10000
wait 10000 "Please Wait"  

CD folder

yes

Changes the current directory (restored after script execution)

CD "Z:\ZipDisc"
CD "C:\My Files\" 

AUDIO onoff

2.92

Enables or disables the audio emulation

audio on

SAFEDISC onoff

2.41

Enables or disables the safedisc emulation

safedisc on

SECUROM onoff

2.41

Enables or disables the securom emulation

securom off

LASERLOK onoff

2.47

Enables or disables the laserlok emulation

laserlok off

DEVICES [SET] count

2.41

Set the minimum number of devices (range: 0 to 4)
(SET set's the number, reduce count)
devices set 0 disables the cd-emulation

devices 4
devices min 2
devices 0 

DEBUG onoff

yes

Enables or disables the Debug-Mode
(Each command is displayed before execution)

debug on
debug 0 

ERRORSTOP onoff

yes

Enables or disables "stop script on error" (default: on)

errorstop off

SCRIPT scriptfile

yes

Calls a sub-script

script "sample-script.dui"

ADDIMG image

yes

Add an image to the image list

addimage test.iso

SETRES w h b f

yes

Change the current display resolution to width height bitsperpixel and frequency (0 means don't change).
This function succeeds only if no reboot is required.
The previous settings are stored in the environment-variable curres.
ATTENTION: Wrong settings may crash your system (e.g. graphics, monitor), so use only values you've proved to be valid (NO guarantee).

setres 1024 768 512 0
setres %curres% 

INIGET variable ini section valuename

yes

Query a value from a configuration file and stores it into a variable.

INIGET country win.ini "intl" "iCountry"
INIGET gamedir  game.ini Game irectory 

REGGET variable key value

yes

Query a value from the registry and stores it into a variable.

REGGET regval "HKCU:Software\GameManu\GameName" "Directory"
REGGET regval "HKCR:Software\GameManufacturer\GameName" "Directory" 


devs: The id of the device or "all" or "#" (mount device), e.g. 0 or 2 or all or #
image: The quoted or unquoted name of the image relativ to the script directory (quotes are required if the name contains spaces).
onoff: Flag wether the option is to be enabled ("ON" or "1") or disabled ("OFF" or "0")

Environment variables:
E.v. are available only within a script on parameters, but not for called applications!
-common environment variables:

 

%TEMP%

A folder for temporary files (e.g. C:\Windows\Temp)

 

%windir%

The Windows-Directory (e.g.: C:\Windows)

 

 

 

-additional evironment variables:

 

%curdev%

Current demon device number (0 to 3)

 

%curdir%

Current demon device drive letter (e.g. E: or P: )

 

%devX%

where X is from 0 to 3 (drive letter of demon device X)

 

%duiscript%

The absolute filename of the script (e.g. F:\Daemon UI\test.dui)

 

%duipath%

The path of the script (e.g. F:\Daemon UI)

 

%curres% 

Current display settings valid as arguments of the setres-command

 

 

 

 

Sample Scripts:

A) J:\Daemon\MSDN 10'2000 all.dui:
  Mounts all three CD-Images on the drives P,Q and R and then executes the link to open the help index.

mount P "J:\Daemon\MSDN 10'2000 1of3.ISO"
mount Q "J:\Daemon\MSDN 10'2000 2of3.ISO"
mount R "J:\Daemon\MSDN 10'2000 3of3.ISO"
env on
run "%windir%\Startmenu\Programs\MSDN Library - October 2000.lnk"
 

B) J:\Daemon\Xtra Fighter.dui:
  Mounts an image on the currenr drive (#) and execute a program on the CD.

env on
mount # J:\Daemon\Xtra Fighter.cue
run %curdir%\cdstart\xtra.exe

B) J:\Daemon\Unpack XX.dui:
  Extract an image from a zip-file and mount it

env on
run /wait pkunzip J:\Daemon\zipped\GameHeaven.zip %TEMP% GameHeaven.*
mount # %TEMP%\GameHeaven.cue
 


DaemonUI, Copyright ©2000-2004  Harald Breitner